package ubiqweb.spring3.model;

import java.util.Date;

import javax.validation.constraints.Size;

import org.hibernate.annotations.ForeignKey;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.SecondaryTable;
import javax.persistence.SecondaryTables;
import javax.persistence.Table;

import ubiqweb.spring3.model.Registration;

@Entity
@Table(name = "registered_attendees")

@SecondaryTables({
		@SecondaryTable(name = "trainings",
				pkJoinColumns=@PrimaryKeyJoinColumn(name="training_id")),
	
		@SecondaryTable(name="user_info",
			pkJoinColumns=@PrimaryKeyJoinColumn(name="user_id"))
		})

/*@SecondaryTables({
		@SecondaryTable(name = "trainings"),
		@SecondaryTable(name="user_info")
		})*/

public class Payment {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "registered_id")
	private Integer registeredId;

	@Column(name = "transaction_number")
	private String transactionNumber;

	@Column(name="user_id")
	private String userId;
	
	@Column(name = "payment_date")
	private String paymentDate;
	
	@Column(name="training_id")
	private String trainingId;
	
	@Column(name = "payment_desc")
	private String paymentDesc;
	
	@Column(name = "payment_status")
	private String paymentStatus;
	
	@Column(table="trainings",name="topic")
	private String topic;
	
	@Column(table="trainings",name="training_fee")
	private String training_fee;	

	@Column(table="user_info",name="last_name")
	private String lastName;	
	
	@Column(name="payment_type")
	private String paymentType;
	public Payment() {		
	}

	public Integer getRegisteredId() {
		return registeredId;
	}

	public void setRegisteredId(Integer registeredId) {
		this.registeredId = registeredId;
	}

	public String getTransactionNumber() {
		return transactionNumber;
	}

	public void setTransactionNumber(String transactionNumber) {
		this.transactionNumber = transactionNumber;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getPaymentDate() {
		return paymentDate;
	}

	public void setPaymentDate(String paymentDate) {
		this.paymentDate = paymentDate;
	}

	public String getTrainingId() {
		return trainingId;
	}

	public void setTrainingId(String trainingId) {
		this.trainingId = trainingId;
	}

	public String getPaymentDesc() {
		return paymentDesc;
	}

	public void setPaymentDesc(String paymentDesc) {
		this.paymentDesc = paymentDesc;
	}

	public String getPaymentStatus() {
		return paymentStatus;
	}

	public void setPaymentStatus(String paymentStatus) {
		this.paymentStatus = paymentStatus;
	}

	public String getTopic() {
		return topic;
	}

	public void setTopic(String topic) {
		this.topic = topic;
	}

	public String getTraining_fee() {
		return training_fee;
	}

	public void setTraining_fee(String trainingFee) {
		training_fee = trainingFee;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getPaymentType() {
		return paymentType;
	}

	public void setPaymentType(String paymentType) {
		this.paymentType = paymentType;
	}

}